package com.gyx.rocsun.bootstrap;

/**
 * @program: rocsun
 * @description:
 * @author: yx.guo
 * @create: 2024-08-28 23:53
 **/
public class B extends A{

    public static void main(String[] args) {
        A a = new B();
        Interface1 interface1 = new A();
        Interface1 interface11 = new B();
        System.out.println(a instanceof B);  // true
        System.out.println(a instanceof A);  // true
        System.out.println(a.getClass().getName()); // com.gyx.rocsun.bootstrap.A
        System.out.println(B.class.getName()); // com.gyx.rocsun.bootstrap.B
        for (Class<?> anInterface : interface11.getClass().getInterfaces()) {
            System.out.println(anInterface.getName());
        }
    }

}
